<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>dynamic_string_buffer</title>
    <link rel="stylesheet" href="../../boostbook.css" type="text/css">
    <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
    <link rel="home" href="../../index.html" title="Asio">
    <link rel="up" href="../reference.html" title="Reference">
    <link rel="prev" href="dynamic_buffer/overload4.html" title="dynamic_buffer (4 of 4 overloads)">
    <link rel="next" href="dynamic_string_buffer/capacity.html" title="dynamic_string_buffer::capacity">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
    <tr>
        <td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="dynamic_buffer/overload4.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                                      href="../reference.html"><img
        src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png"
                                                                                      alt="Home"></a><a accesskey="n"
                                                                                                        href="dynamic_string_buffer/capacity.html"><img
        src="../../next.png" alt="Next"></a>
</div>
<div class="section">
    <div class="titlepage">
        <div>
            <div><h3 class="title">
                <a name="asio.reference.dynamic_string_buffer"></a><a class="link" href="dynamic_string_buffer.html"
                                                                      title="dynamic_string_buffer">dynamic_string_buffer</a>
            </h3></div>
        </div>
    </div>
    <p>
        <a class="indexterm" name="asio.indexterm.dynamic_string_buffer"></a>
    </p>
    <p>
        Adapt a basic_string to the DynamicBuffer requirements.
    </p>
    <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">typename</span> <span class="identifier">Elem</span><span class="special">,</span>
    <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">,</span>
    <span class="keyword">typename</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">dynamic_string_buffer</span>
</pre>
    <h5>
        <a name="asio.reference.dynamic_string_buffer.h0"></a>
        <span><a name="asio.reference.dynamic_string_buffer.types"></a></span><a class="link"
                                                                                 href="dynamic_string_buffer.html#asio.reference.dynamic_string_buffer.types">Types</a>
    </h5>
    <div class="informaltable">
        <table class="table">
            <colgroup>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>
                    <p>
                        Name
                    </p>
                </th>
                <th>
                    <p>
                        Description
                    </p>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/const_buffers_type.html"
                           title="dynamic_string_buffer::const_buffers_type"><span class="bold"><strong>const_buffers_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The type used to represent a sequence of constant buffers that
                        refers to the underlying memory.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/mutable_buffers_type.html"
                           title="dynamic_string_buffer::mutable_buffers_type"><span class="bold"><strong>mutable_buffers_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The type used to represent a sequence of mutable buffers that refers
                        to the underlying memory.
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <h5>
        <a name="asio.reference.dynamic_string_buffer.h1"></a>
        <span><a name="asio.reference.dynamic_string_buffer.member_functions"></a></span><a class="link"
                                                                                            href="dynamic_string_buffer.html#asio.reference.dynamic_string_buffer.member_functions">Member
        Functions</a>
    </h5>
    <div class="informaltable">
        <table class="table">
            <colgroup>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>
                    <p>
                        Name
                    </p>
                </th>
                <th>
                    <p>
                        Description
                    </p>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/capacity.html"
                           title="dynamic_string_buffer::capacity"><span
                                class="bold"><strong>capacity</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Get the maximum size that the buffer may grow to without triggering
                        reallocation.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/commit.html"
                           title="dynamic_string_buffer::commit"><span class="bold"><strong>commit</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        DynamicBuffer_v1: Move bytes from the output sequence to the input
                        sequence.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/consume.html"
                           title="dynamic_string_buffer::consume"><span class="bold"><strong>consume</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        DynamicBuffer_v1: Remove characters from the input sequence. DynamicBuffer_v2:
                        Consume the specified number of bytes from the beginning of the
                        underlying memory.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/data.html" title="dynamic_string_buffer::data"><span
                                class="bold"><strong>data</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        DynamicBuffer_v1: Get a list of buffers that represents the input
                        sequence. <br> <span class="silver"> —</span><br> DynamicBuffer_v2: Get a sequence of buffers
                        that represents the underlying memory.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/dynamic_string_buffer.html"
                           title="dynamic_string_buffer::dynamic_string_buffer"><span class="bold"><strong>dynamic_string_buffer</strong></span></a>
                        <span class="silver">[constructor]</span>
                    </p>
                </td>
                <td>
                    <p>
                        Construct a dynamic buffer from a string. <br> <span class="silver"> —</span><br>
                        DynamicBuffer_v2:
                        Copy construct a dynamic buffer. <br> <span class="silver"> —</span><br> Move construct a
                        dynamic buffer.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/grow.html" title="dynamic_string_buffer::grow"><span
                                class="bold"><strong>grow</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        DynamicBuffer_v2: Grow the underlying memory by the specified number
                        of bytes.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/max_size.html"
                           title="dynamic_string_buffer::max_size"><span
                                class="bold"><strong>max_size</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Get the maximum size of the dynamic buffer.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/prepare.html"
                           title="dynamic_string_buffer::prepare"><span class="bold"><strong>prepare</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        DynamicBuffer_v1: Get a list of buffers that represents the output
                        sequence, with the given size.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/shrink.html"
                           title="dynamic_string_buffer::shrink"><span class="bold"><strong>shrink</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        DynamicBuffer_v2: Shrink the underlying memory by the specified
                        number of bytes.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="dynamic_string_buffer/size.html" title="dynamic_string_buffer::size"><span
                                class="bold"><strong>size</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        DynamicBuffer_v1: Get the size of the input sequence. DynamicBuffer_v2:
                        Get the current size of the underlying memory.
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <p>
        Requires that <code class="computeroutput"><span class="keyword">sizeof</span><span
            class="special">(</span><span class="identifier">Elem</span><span class="special">)</span> <span
            class="special">==</span> <span class="number">1</span></code>.
    </p>
    <h5>
        <a name="asio.reference.dynamic_string_buffer.h2"></a>
        <span><a name="asio.reference.dynamic_string_buffer.requirements"></a></span><a class="link"
                                                                                        href="dynamic_string_buffer.html#asio.reference.dynamic_string_buffer.requirements">Requirements</a>
    </h5>
    <p>
        <span class="emphasis"><em>Header: </em></span><code class="literal">asio/buffer.hpp</code>
    </p>
    <p>
        <span class="emphasis"><em>Convenience header: </em></span><code class="literal">asio.hpp</code>
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%">
    <tr>
        <td align="left"></td>
        <td align="right">
            <div class="copyright-footer">Copyright © 2003-2022 Christopher M. Kohlhoff<p>
                Distributed under the Boost Software License, Version 1.0. (See accompanying
                file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
            </p>
            </div>
        </td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="dynamic_buffer/overload4.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                                      href="../reference.html"><img
        src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png"
                                                                                      alt="Home"></a><a accesskey="n"
                                                                                                        href="dynamic_string_buffer/capacity.html"><img
        src="../../next.png" alt="Next"></a>
</div>
</body>
</html>
